/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SQL;

import java.sql.*;

public class Insertar {

    public void insertar(String sql) {

        String cc = "jdbc:postgresql://localhost:5432/WEBARTENOBSA?user=postgres&password=pokemon";

        try {
            Class.forName("org.postgresql.Driver");
            Connection conexion = DriverManager.getConnection(cc);
            Statement comando = conexion.createStatement();

            ResultSet resultado = comando.executeQuery(sql);
            resultado.close();
            comando.close();
            conexion.close();
        } catch (Exception ev) {
            System.out.println(ev.getMessage());

        }

    }
}
